3.5.3 \(\int \frac {A+B x}{x \sqrt {a+b x}} \, dx\)

Optimal. Leaf size=40 \[ \frac {2 B \sqrt {a+b x}}{b}-\frac {2 A \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {80, 63, 208} \begin {gather*} \frac {2 B \sqrt {a+b x}}{b}-\frac {2 A \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(x*Sqrt[a + b*x]),x]

[Out]

(2*B*Sqrt[a + b*x])/b - (2*A*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/Sqrt[a]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 80

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(c + d*x)
^(n + 1)*(e + f*x)^(p + 1))/(d*f*(n + p + 2)), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin {align*} \int \frac {A+B x}{x \sqrt {a+b x}} \, dx &=\frac {2 B \sqrt {a+b x}}{b}+A \int \frac {1}{x \sqrt {a+b x}} \, dx\\ &=\frac {2 B \sqrt {a+b x}}{b}+\frac {(2 A) \operatorname {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x}\right )}{b}\\ &=\frac {2 B \sqrt {a+b x}}{b}-\frac {2 A \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 40, normalized size = 1.00 \begin {gather*} \frac {2 B \sqrt {a+b x}}{b}-\frac {2 A \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(x*Sqrt[a + b*x]),x]

[Out]

(2*B*Sqrt[a + b*x])/b - (2*A*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/Sqrt[a]

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.03, size = 40, normalized size = 1.00 \begin {gather*} \frac {2 B \sqrt {a+b x}}{b}-\frac {2 A \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(A + B*x)/(x*Sqrt[a + b*x]),x]

[Out]

(2*B*Sqrt[a + b*x])/b - (2*A*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/Sqrt[a]

________________________________________________________________________________________

fricas [A]  time = 0.89, size = 94, normalized size = 2.35 \begin {gather*} \left [\frac {A \sqrt {a} b \log \left (\frac {b x - 2 \, \sqrt {b x + a} \sqrt {a} + 2 \, a}{x}\right ) + 2 \, \sqrt {b x + a} B a}{a b}, \frac {2 \, {\left (A \sqrt {-a} b \arctan \left (\frac {\sqrt {b x + a} \sqrt {-a}}{a}\right ) + \sqrt {b x + a} B a\right )}}{a b}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/(b*x+a)^(1/2),x, algorithm="fricas")

[Out]

[(A*sqrt(a)*b*log((b*x - 2*sqrt(b*x + a)*sqrt(a) + 2*a)/x) + 2*sqrt(b*x + a)*B*a)/(a*b), 2*(A*sqrt(-a)*b*arcta
n(sqrt(b*x + a)*sqrt(-a)/a) + sqrt(b*x + a)*B*a)/(a*b)]

________________________________________________________________________________________

giac [A]  time = 1.21, size = 36, normalized size = 0.90 \begin {gather*} \frac {2 \, A \arctan \left (\frac {\sqrt {b x + a}}{\sqrt {-a}}\right )}{\sqrt {-a}} + \frac {2 \, \sqrt {b x + a} B}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/(b*x+a)^(1/2),x, algorithm="giac")

[Out]

2*A*arctan(sqrt(b*x + a)/sqrt(-a))/sqrt(-a) + 2*sqrt(b*x + a)*B/b

________________________________________________________________________________________

maple [A]  time = 0.01, size = 35, normalized size = 0.88 \begin {gather*} \frac {-\frac {2 A b \arctanh \left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right )}{\sqrt {a}}+2 \sqrt {b x +a}\, B}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/x/(b*x+a)^(1/2),x)

[Out]

2/b*((b*x+a)^(1/2)*B-A*b/a^(1/2)*arctanh((b*x+a)^(1/2)/a^(1/2)))

________________________________________________________________________________________

maxima [A]  time = 1.96, size = 47, normalized size = 1.18 \begin {gather*} \frac {A \log \left (\frac {\sqrt {b x + a} - \sqrt {a}}{\sqrt {b x + a} + \sqrt {a}}\right )}{\sqrt {a}} + \frac {2 \, \sqrt {b x + a} B}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/(b*x+a)^(1/2),x, algorithm="maxima")

[Out]

A*log((sqrt(b*x + a) - sqrt(a))/(sqrt(b*x + a) + sqrt(a)))/sqrt(a) + 2*sqrt(b*x + a)*B/b

________________________________________________________________________________________

mupad [B]  time = 0.07, size = 32, normalized size = 0.80 \begin {gather*} \frac {2\,B\,\sqrt {a+b\,x}}{b}-\frac {2\,A\,\mathrm {atanh}\left (\frac {\sqrt {a+b\,x}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/(x*(a + b*x)^(1/2)),x)

[Out]

(2*B*(a + b*x)^(1/2))/b - (2*A*atanh((a + b*x)^(1/2)/a^(1/2)))/a^(1/2)

________________________________________________________________________________________

sympy [A]  time = 7.77, size = 56, normalized size = 1.40 \begin {gather*} \frac {2 A \operatorname {atan}{\left (\frac {1}{\sqrt {- \frac {1}{a}} \sqrt {a + b x}} \right )}}{a \sqrt {- \frac {1}{a}}} - B \left (\begin {cases} - \frac {x}{\sqrt {a}} & \text {for}\: b = 0 \\- \frac {2 \sqrt {a + b x}}{b} & \text {otherwise} \end {cases}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/(b*x+a)**(1/2),x)

[Out]

2*A*atan(1/(sqrt(-1/a)*sqrt(a + b*x)))/(a*sqrt(-1/a)) - B*Piecewise((-x/sqrt(a), Eq(b, 0)), (-2*sqrt(a + b*x)/
b, True))

________________________________________________________________________________________